home *** CD-ROM | disk | FTP | other *** search
/ SuperHack / SuperHack CD.bin / CODING / CPP / WCLASS95.ZIP / PASCAL.TXT < prev    next >
Encoding:
Text File  |  1995-08-02  |  1.8 KB  |  36 lines

  1. Borland Object Pascal - Getting Started Object Pascal Script
  2.  
  3. Class Diagram: pascar.omt
  4. Script Files: pascal1.sct
  5. Main Files: pasuser.pas
  6.  
  7. The steps to generate Borland Object Pascal code and to compile the generated files are as follows:
  8.  
  9. >> Launch With Class from Windows
  10. >> Open pascar.omt
  11. >> Double click on each class to enter information in the Class Specification dialog box.  Enter Unit name in
  12. the File Name box and enter the Uses Unit names in the Include File box.  Add a semicolon to the last unit
  13. name
  14. >> Select "Generate - Generate Class Code"
  15. >> Select pas as the custom file extension
  16. >> Select pascal1.sct to generate the Pascal units
  17. >> Select "File - Edit File" to examine the generated files, e.g. car.pas
  18. >> Launch your Pascal environment
  19. >> Compile, make, and build each generated file, e.g. VehicleU.pas, MotorUn.pas, CellulaU.pas,
  20. PassengU.pas, TireUnit.pas, and CarUnit.pas.
  21. >> Compile, make, build and execute pasuser.pas
  22.  
  23. Notes for generating Object Pascal (Turbo Pascal 5.5. or greater):
  24.  
  25. (1) In With Class enter the unit name in the class specification dialog box "File Name" field.  The file name
  26. becomes the unit file name and the unit name, e.g. file name = CarUnit.pas.
  27.  
  28. (2) For uses clause, enter the unit name in the Include Box.  Enter the last unit followed by a ; e.g. UnitZ;
  29. Ensure that the unit names entered in the Include Box are consistent with the unit names entered in the
  30. CLASS_FILENAME Box.
  31.  
  32. (3) On the class diagram, insert parameters in the C++ form, e.g. Parameter_Type Parameter_Name - Integer
  33. aNumber.  The script variable PASCAL_OPERATION_PARAMETERS_WITH_VAR then puts the parameter
  34. into the Pascal form, e.g. (Parameter_Name : Parameter_Type ; Var A_Parameter_Type : Parameter_Type) -
  35. (A_Number : Integer ; Var A_Integer : Integer).
  36.